# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  https://gitee.com/autumner/pythoncookbook
@software: PyCharm 
@file: net_udp_client_1.py 
@time: 2019/7/11 下午1:40
"""
'''
创建多线程服务的客户端
'''

from socket import socket, AF_INET, SOCK_DGRAM

s = socket(AF_INET, SOCK_DGRAM)
# s.connect(('localhost', 20000))
# s.send(b'')
s.sendto(b'',('localhost', 20000))
print(s.recvfrom(8192))